package com.example.eliteedu_prism;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class demo1 {



    public static void main(String[] args) {
        Random rand = new Random();
        ArrayList <Integer> arrayList=new ArrayList<>();
        int index;
        List<Integer> list =new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(5);
        list.add(6);
        list.add(7);
        list.add(8);

        for (Integer i = 0; i < list.size(); i++) {//1 2 5 6 7 8
            int student_id = list.get(i);//1
            index =rand.nextInt(list.size());
            while (index==i||arrayList.contains(index)) {
                index = rand.nextInt(list.size());
            }
            arrayList.add(index);
            int grader = list.get(index);//0-5随机取值

        }
    }
}
